package com.haiheng.common.api

import com.haiheng.library_base.utils.SPUtils

import com.haiheng.common.constant.AppConstant

/**
 *
 * @Des:
 * @Author: hwz
 * @Date:2022/5/6 0006
 * @Version: 1.0
 */
class API {

    companion object {
        //通用地址
//        const val BASE_URL = "http://172.16.1.20:9290"
        const val  BASE_URL = "http://218.17.192.251:9100"
//        const val  BASE_URL = "https://rsp.fjlib.net:3002"
//        const val ACS_URL = "http://218.17.192.253:15606"
//        const val ACS_URL = "http://218.17.192.251:9100"
        const val ACS_URL = "https://rsp.fjlib.net:3002"
//        const val ACS_URL = "http://172.16.0.119:15200"
        const val SP_BASE_URL = "SP_BASE_URL"
        const val SP_ACS_URL = "SP_ACS_URL"

        fun getBaseUrl(): String {
            var baseUrl = SPUtils.getInstance().getString(SP_BASE_URL, BASE_URL)
            return baseUrl
        }

        fun getAcsUrl(): String {
            var acsUrl = SPUtils.getInstance().getString(SP_ACS_URL, ACS_URL)
            return acsUrl
        }
    }

    interface PARAM {
        companion object {
            const val CLIENT_SECRET = "devUnion123!"
            const val GRANT_TYPE = "client_credentials"
            const val CLIENT_ID = "devUnion"
            const val PARAM_HEADER_TOKEN = "Authorization"
            const val PARAGM_REQUEST_OBJECT = "edc.mach"
            const val PARAGN_MODE_TYPE = "VWR-S1"
            const val PARAGE_CATALOG_TYPE = 7

        }
    }

    interface OPERATION {
        companion object {
            const val ADDMACHINE = "AddMachine"//添加设备
            const val ADDSTATUS = "AddStatus"//上报
        }
    }

    interface BOOK_CAR_PATH{
        companion object{
            const val PARAGE_MACHINEUUID = "MachineUuid"
            const val PARAGE_BARCODES = "Barcodes"
            const val GATWAAY = "/tumew/ldc/collection"
            const val GATAWAY_MACHINE= "/tumew/edc/machine"
//            const val GET_TOLEN = "/tunano/passport/connect/token"
            const val GET_TOLEN = "/tumew/ldc/passport/connect/token"
            const val QUARY_MACHINELUID = "/v1/edc/mach/Machineluid/{Machineluid"

            const val QUARY_MACHINELUID_WANGGUAN = "$GATAWAY_MACHINE/api/v1/machines/machine-uuid/{MachineUuid}"
            ///api/v1/holdings
//            const val GET_BOOK_LIST_BY_MACHINEL = "/tunano/ldc/collection/v2/ldc/collection/holdings/machine-uuid/{MachineUuid}/all"
            const val GET_BOOK_LIST_BY_MACHINEL = "$GATWAAY/api/v1/holdings"
            ///api/v1/holdings/barcode/{barcode}
//            const val GET_BOOK_INFO = "/tunano/ldc/collection/v2/ldc/collection/holdings/barcode/{Barcodes}"
            const val GET_BOOK_INFO = "$GATWAAY/api/v1/holdings/barcode/{Barcodes}"
//            const val ADD_BOOK_SHELF = "/tunano/ldc/collection/v2/ldc/collection/holdings/machine-uuid/{MachineUuid}/checkins"
            const val ADD_BOOK_SHELF = "$GATWAAY/api/v1/holdings/machine-uuid/{MachineUuid}/checkins"
//            const val ADD_SCAN_BOOK = "/tunano/ldc/collection/v2/ldc/collection/holdings/machine-uuid/{MachineUuid}/checkouts"
            const val ADD_SCAN_BOOK = "$GATWAAY/api/v1/holdings/machine-uuid/{MachineUuid}/checkouts"
            // /api/v1/desk-book-delivery-orders 参数0
//            const val GET_ORDER_LIST = "/tunano/ldc/collection/v2/ldc/collection/study-desk-deliver-book-orders"
            const val GET_ORDER_LIST = "$GATWAAY/api/v1/desk-book-delivery-orders"
            //取消，确认
            const val CHANGE_ORDER_STATUS = "/tunano/ldc/collection/v2/ldc/collection/study-desk-deliver-book-orders/{studyDeskDeliverBookOrderId}/review"
            const val CHANGE_DELIVERY_ORDERS_PREPARATION= "$GATWAAY/api/v1/desk-book-delivery-orders/order-number/{orderNumber}/preparations"
            const val CHANGE_DELIVERY_ORDERS_DELIVERIES = "$GATWAAY/api/v1/desk-book-delivery-orders/order-number/{orderNumber}/deliveries"
            const val CHANGE_DELIVERY_ORDERS_CANCEL     = "$GATWAAY/api/v1/desk-book-delivery-orders/order-number/{orderNumber}/cancellations"
            const val CHANGE_DELIVERY_ORDERS_ARRIVALS   = "$GATWAAY/api/v1/desk-book-delivery-orders/order-number/{orderNumber}/awaiting-pickups"
            const val CHANGE_DELIVERY_ORDERS_COMPLETIONS= "$GATWAAY/api/v1/desk-book-delivery-orders/order-number/{orderNumber}/completions"

            const val QUAARY_LOCATION = "$GATWAAY/api/v1/bibliographies/{bibliographyId}/holdings"
        }
    }

    interface PATH {
        companion object {

            /**
             * 登录
             */
            const val GET_TOKEN = "/api/SysUser/GetJwtToken"

            //            http://218.17.192.253:15606/v1/cdc/acs/querybookinfo?librarycode=CN-51800-HHCSLIB&mac=1&booksn=E004015066467ABA
            const val SEARCH_LAYOUT_MAP = "/api/WwOutMapSys/SearchLayerMap" //获取层架信息
            const val BOOK_ASSET_LOCATION = "/api/WwBookAsset/BookAssetLocation" //上架
            const val ONSELF_BY_CALLNUMBER = "/api/WwBookAsset/OnSelfByCallNumber" //智慧上架
            const val SEARCH_MORE_INFO = "/api/WwBookAsset/SearchMoreInfo" //书籍查询
            const val BOOK_ASSET_OFF_LOCATION = "/api/WwBookAsset/BookAssetOffLocation" //书籍下架
            const val SEARCH_BOOK_RETIREMENT = "/api/WkJobTaskList/Search" //剔旧查询
            const val SEARCH_ALARMEDBOOKS = "/api/ShareSpInfos/Search" //报警查询
            const val BOOK_SHIFTING = "/api/WwBookAsset/BookShifting" //整层倒架


            //acs查询书籍信息
            const val QUERY_BOOK_INFO = "/v1/cdc/acs/QueryBookInfo"

            const val CONNECT_TOKEN = "/tunano/passport/connect/token"
            const val EDC_MACH = "/tunano/edc/mach/v1/edc/mach"
        }
    }


}

